package wu2020.top.spring.boot.flyway.simple.infrastructure.converter;

import wu2020.top.spring.boot.flyway.simple.domain.model.person.Person;
import wu2020.top.spring.boot.flyway.simple.infrastructure.entity.PersonDO;
import org.mapstruct.factory.Mappers;
import org.mapstruct.Mapper;
/**
 * describe person 
 *
 * @author Jia wei Wu
 * @date 2024/03/07 09:59 上午
 * @see com.wu.framework.inner.lazy.persistence.reverse.lazy.ddd.DefaultDDDLazyInfrastructureConverter 
 **/
@Mapper
public interface PersonConverter {


    /**
     * describe MapStruct 创建的代理对象
     *
     
     
     
     * @author Jia wei Wu
     * @date 2024/03/07 09:59 上午
     **/
    PersonConverter INSTANCE = Mappers.getMapper(PersonConverter.class);
    /**
     * describe 实体对象 转换成领域对象
     *
     * @param personDO 实体对象     
     * @return {@link Person} 领域对象     
     
     * @author Jia wei Wu
     * @date 2024/03/07 09:59 上午
     **/
    Person toPerson(PersonDO personDO);
    /**
     * describe 领域对象 转换成实体对象
     *
     * @param person 领域对象     
     * @return {@link PersonDO} 实体对象     
     
     * @author Jia wei Wu
     * @date 2024/03/07 09:59 上午
     **/
     PersonDO fromPerson(Person person); 
}